package org.rasterfun.language2

import num.{NumFunction, Num}

/**
 * Include for common math funcs.
 * 
 * @author Hans Haggstrom
 */
object LangMath {

  def sin(n: Num)  = NumFunction("Math.sin", n)
  def cos(n: Num)  = NumFunction("Math.cos", n)
  def tan(n: Num)  = NumFunction("Math.tan", n)
  def asin(n: Num) = NumFunction("Math.asin", n)
  def acos(n: Num) = NumFunction("Math.acos", n)
  def atan(n: Num) = NumFunction("Math.atan", n)
  def abs(n: Num)  = NumFunction("Math.abs", n)

  def noise(a: Num) = NumFunction("SimplexNoise.noise", a)
  def noise(a: Num, b: Num) = NumFunction("SimplexNoise.noise", a, b)
  def noise(a: Num, b: Num, c : Num) = NumFunction("SimplexNoise.noise", a, b, c)
  def noise(a: Num, b: Num, c : Num, d: Num) = NumFunction("SimplexNoise.noise", a, b, c, d)

}

